
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>我的订单</title>
    <link rel="stylesheet" type="text/css" href="__STATIC__/tpshop/css/tpshop.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/tpshop/css/myaccount.css" />
    <script src="/template/pc/rainbow/static/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/public/js/layer/layer.js" type="text/javascript"></script>
    <script type="text/javascript" src="/public/static/js/layer/laydate/laydate.js"></script>
</head>
<style>
    .navitems2 li .selected {color: #e23435;border-bottom-color: #e23435;}
</style>
<body class="bg-f5">
<script src="/public/js/global.js" type="text/javascript"></script>
<link rel="stylesheet" href="__STATIC__/tpshop/css/location.css" type="text/css"><!-- 收货地址，物流运费 -->
<script src="/public/static/js/layer/layer.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__STATIC__/tpshop/css/base.css"/>
<link rel="shortcut icon" type="image/x-icon" href="/public/upload/logo/2018/04-09/516bc70315079d81dc3726991672b4af.png" media="screen"/>
<style>
    .list1 li{float:left;}
</style>
<script src="/template/pc/rainbow/static/js/common.js"></script>
<!--------收货地址，物流运费-开始-------------->
<script src="/public/js/locationJson.js"></script>
<script src="/template/pc/rainbow/static/js/location.js"></script>
<script>doInitRegion();</script>


<div class="home-index-middle">
    <div class="w1224">
        <div class="g-crumbs">
            <a href="/">我的商城</a>
            <i class="litt-xyb"></i>
            <span>我的订单</span>
        </div>
        <div class="home-main">
            <div class="ri-menu fr">
                <div class="menumain p">
                    <div class="navitems2 p" id="navitems5">
                        <ul>
                            <li>
                                <a href="/order/index?type=0"  {if condition="(isset($_GET['type']) neq true)"} class="selected" {/if} {if condition="isset($_GET['type']) eq true"}{if condition="$_GET['type'] eq 0"} class="selected" {/if}{/if}>全部订单</a>
                            </li>
                            <li>
                                <a href="/order/index?type=1"  {if condition="isset($_GET['type']) eq true"}{if condition="$_GET['type'] eq 1"} class="selected" {/if}{/if}>待发货</a>
                            </li>
                            <li>
                                <a href="/order/index?type=2" {if condition="isset($_GET['type']) eq true"}{if condition="$_GET['type'] eq 2"} class="selected" {/if}{/if} >待收货</a>
                            </li>
                            <li>
                                <a href="/order/index?type=3" {if condition="isset($_GET['type']) eq true"}{if condition="$_GET['type'] eq 3"} class="selected" {/if}{/if}>已收货</a>
                            </li>
                            <!--<li>-->
                            <!--<a href="javascript:void(0);" class="">预售订单</a>-->
                            <!--</li>-->
                        </ul>
                        <div class="wrap-line" style="width: 130px; left: 10px;" >
                            <span style="left:15px;"></span>
                        </div>
                    </div>
                    <div class="menu_search p">
                        <form id="search_order" action="/order/index" method="get">
                            <input class="sea_ol" type="text" name="search_key" id="search_key" value="{$_GET['search_key']|default=''}"  placeholder="订单编号" />
                            <input class="sea_et" type="submit" value="查询" style="cursor: pointer;"/>
                            <!--    <span class="coice">
                                    更多筛选条件
                                    <i class="jt-x"></i>
                                </span>
                                <div class="time-qjc">
                                    下单时间：<input id="start_time" name="start_time" value="" style="width:150px;padding:7px 10px;border:1px solid #ccc;outline: none;"/>
                                    <span>至</span>
                                    <input id="end_time" name="end_time" style="width:150px;padding:7px 10px;border:1px solid #ccc;outline: none;" />
                                    <div class="nearl-zj">
                                        <ul>
                                            <li><a onclick="time_for_one_month();">最近一个月</a></li>
                                            <li><a onclick="time_for_three_month();">最近三个月</a></li>
                                            <li><a onclick="time_for_one_year();">最近一年</a></li>
                                        </ul>
                                    </div>
                                    <div class="mu-btn">
                                        <a onclick="check_search_order();" href="jsvascript:">查询</a>
                                    </div>
                                </div>-->
                        </form>
                    </div>
                    <div class="orderbook-list">
                        <div class="book-tit">
                            <ul>
                                <li class="sx1">商品信息</i></li>
                                <li class="sx2">单价</li>
                                <li class="sx3">数量</li>
                                <li class="sx4">订单总金额</li>
                                <li class="sx5 s5clic">订单状态<i class="jt-x"></i></li>
                                <li class="sx6">操作</li>
                            </ul>
                        </div>
                        <div class="hid-derei">
                            <ul>
                                <li><a href="/index.php/home/Order/order_list.html">全部订单</a></li>
                                <li><a href="/index.php/home/Order/order_list/type/WAITPAY.html">待付款</a></li>
                                <li><a href="/index.php/home/Order/order_list/type/WAITSEND.html">待发货</a></li>
                                <li><a href="/index.php/home/Order/order_list/type/WAITRECEIVE.html">待收货</a></li>
                                <li><a href="/index.php/home/Order/comment/status/0.html">待评论</a></li>
                                <li><a href="/index.php/home/Order/order_list/type/FINISH.html">已完成</a></li>
                                <li><a href="/index.php/home/Order/order_list/type/CANCEL.html">已取消</a></li>
                                <!--<li><a href="">预售订单</a></li>-->
                            </ul>
                        </div>
                    </div>
                    <div class="order-alone-li lastset_cm">

                        {notempty name="orderList"}
                        {volist name="orderList" id="vo"}
                        <table width="100%" border="" cellspacing="" cellpadding="">
                        <tr class="time_or">
                        <td colspan="6">
                        <div class="fl_ttmm">
                        <span class="time-num">下单时间：<em class="num">{$vo.create_time}</em></span>
                        <span class="time-num">订单编号：<em class="num">{$vo.order_no}</em></span>
                        <div class="paysoon">
                        <!--<div class="dele" onclick="verConfirm('确认删除该订单?','/index.php/Home/Order/del_order/order_id/587.html')"></div>-->
                        <!--<div class="dele"></div>-->
                        </div>
                        </div>
                        <div class="fr_ttmm"></div>
                        </td>
                        </tr>
                        <tr class="conten_or">
                        <td class="sx1">
                        <div class="shop-if-dif">
                        <div class="shop-difimg">
                        <img src="{$vo.goodsInfo.img_ids|get_picture_url}" width="60" height="60" />
                        </div>
                        <div class="shop_name">
                        <a href="/index.php/Home/Goods/goodsInfo/id/13.html">
                         {$vo.goodsInfo.name}                                                   </a>
                        </div>
                        </div>
                        </td>
                        <td class="sx2"><span>￥</span><span>{$vo.goodsInfo.price}</span></td>
                        <td class="sx3">
                        <span>x{$vo.num}</span>
                        </td>
                        <td class="sx4" rowspan="1">
                        <div class="pric_rhz">
                        <p class="d_pri"><span>￥</span><span>{$vo.total_price}</span></p>
                        <p class="d_yzo">
                        <spna>含运费：</spna>
                        <span>0.00</span></p>
                        <p class="d_yzo"><a href="javascript:void(0);">余额支付</a></p>
                        </div>
                        </td>
                        <td class="sx5" rowspan="1">
                        <div class="detail_or">
                        <p class="d_yzo">
                            {$vo.type}
                        </p>
                        <p>
                        <a href="/order/detail?orderid={$vo.id}">查看详情</a>
                        </p>
                        </div>
                        </td>
                        <td class="sx6" rowspan="1">
                        <div class="rbac">
                        <p class=""><a class="buy_order" data-order-id="587" href="/index/details/id/{$vo.goodsInfo.id}">再次购买</a></p>
                        </div>
                        </td>
                        </tr>
                        </table>
                        {/volist}
                        {/notempty}
                    </div>
                </div>
                <div class="operating fixed" id="bottom">
                    <div class="fn_page clearfix">
                        <div class='dataTables_paginate paging_simple_numbers'><ul class='pagination'>    </ul></div>                </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--footer-s-->
<link rel="stylesheet" href="__STATIC__/shopCar/bootstarp/css/bootstrap.min.css" />
<link rel="stylesheet" href="__STATIC__/shopCar/fontAwesome/css/font-awesome.min.css"/>
<link rel="stylesheet" href="__STATIC__/shopCar/css/index.css" />
<footer class="cancelBg">
    <div class="footerBg"></div>
    <div class="footer">
        <div class="container">
            <div class="row">
                <div class="col-lg-3">
                    <img src="__STATIC__/shopCar/images/footer11.png"/>
                </div>
                <div class="col-lg-3">
                    <img src="__STATIC__/shopCar/images/footer22.png"/>
                </div>
                <div class="col-lg-3">
                    <img src="__STATIC__/shopCar/images/footer33.png"/>
                </div>
                <div class="col-lg-3">
                    <img src="__STATIC__/shopCar/images/footer44.png"/>
                </div>
            </div>
            <div class="row footerInfor">
                <div class="col-lg-2">
                    <img src="__STATIC__/shopCar/images/erweima.png"/>
                    <p>扫描关注APP</p>
                </div>
                <div class="col-lg-2">
                    <h4>购物指南</h4>
                    <a>购物流程</a>
                    <a>售后政策</a>
                    <a>支付方式</a>
                </div>
                <div class="col-lg-2">
                    <h4>支付方式</h4>
                    <a>安全支付保障</a>
                    <a>在线支付</a>
                    <a>支付宝支付</a>
                </div>
                <div class="col-lg-2">
                    <h4>售后服务</h4>
                    <a>退换货流程</a>
                    <a>退款流程</a>
                    <a>取消订单</a>
                </div>
                <div class="col-lg-2">
                    <h4>公司简介</h4>
                    <a>关于我们</a>
                    <a>联系我们</a>
                    <a>邮箱反馈</a>
                </div>
            </div>
            <div class="row footerLink">
                <div>
                    <a>商城首页</a> |
                    <a>关于商城</a> |
                    <a>联系我们</a> |
                    <a>帮助中心</a>
                    <p>Copyright © 2004-2017 alinejun版权所有</p>
                </div>
            </div>
        </div>
    </div>
</footer>
<!--footer-e-->
<script type="text/javascript">
    $(function(){
        $('.s5clic').click(function(){
            $('.hid-derei').slideToggle(400);
            $(this).animate({opacity:"1"},200,function(){
                $(this).toggleClass('sxbb')
            })
        })
    })
    //取消订单
    function cancel_order(id){
        layer.confirm('确定取消订单?', {
                btn: ['确定','取消'] //按钮
            }, function(){
                $.ajax({
                    url:"/index.php/Home/Order/cancel_order.html",
                    type:'POST',
                    dataType:'JSON',
                    data:{id:id},
                    success:function(data){
                        if(data.status == 1){
                            layer.alert(data.msg, {icon: 1},function(){
                                location.href ='';
                            })
                        }else{
                            layer.alert(data.msg, {icon: 2});
                        }
                    },
                    error : function() {
                        layer.alert('网络失败，请刷新页面后重试', {icon: 2});
                    }
                });
            }, function(index){
                layer.close(index);
            }
        );
    }
    //确定收货
    function order_confirm(order_id){
        layer.confirm("你确定收到货了吗?",{
            btn:['确定','取消']
        },function(){
            $.ajax({
                type : 'post',
                url : '/index.php?m=Home&c=Order&a=order_confirm',
                data:{order_id:order_id},
                dataType : 'json',
                success : function(data){
                    if(data.status == 1){
                        layer.alert(data.msg, {icon: 1},function () {
                            window.location.href = data.url;
                        });
                    }else{
                        layer.alert(data.msg,{icon:2});
                    }
                },
                error : function(XMLHttpRequest, textStatus, errorThrown) {
                    layer.alert('网络失败，请刷新页面后重试', {icon: 2});
                }
            })
        }, function(index){
            layer.close(index);
        });
    }

    function refund_order(obj){
        layer.open({
            type: 2,
            title: '<b>订单取消申请</b>',
            skin: 'layui-layer-rim',
            shadeClose: true,
            shade: 0.5,
            area: ['600px', '500px'],
            content: $(obj).attr('data-url'),
        });
    }
    $(document).on('click', '.buy_order', function() {
        var order_id = $(this).data('order-id');
        $.ajax({
            type : "post",
            url : "/index.php/Home/Order/oneMore.html",
            data:{order_id:order_id},
            dataType : 'json',
            success : function(data){
                var err_html = '';
                if(data.status == 1){
                    if(data.result.error_list.length == 0){
                        window.location.href = "/index.php/home/Cart/index.html";
                    }else{
                        err_html = '以下商品加入购物车失败:<br/>';
                        $.each(data.result, function (n, value) {
                            err_html += value + '<br/>';
                        });
                        layer.open({
                            title:'加入购物车',
                            content: err_html,
                            btn: ['前往购物车', '取消'],
                            yes: function(index, layero){
                                window.location.href = "/index.php/home/Cart/index.html";
                            },
                            btn2: function(index, layero){
                                layer.closeAll();
                            },
                            cancel: function(){
                                layer.closeAll();
                            }
                        });
                    }
                }else{
                    if(data.result.url != ''){
                        window.location.href = data.result.url;
                        return;
                    }
                    err_html = data.msg+':<br/>';
                    $.each(data.result.error_list, function (n, value) {
                        err_html += value + '<br/>';
                    });
                    layer.open({icon: 2, content: err_html});
                }
            }
        })
    })
</script>
</body>
</html>